package com.xps.and.yuntong.Data.bean1;

import com.google.gson.Gson;

import org.json.JSONException;
import org.json.JSONObject;

import java.util.List;

/**
 * Created by Administrator on 2018/1/25.
 */

public class OrderDriver {

    @Override
    public String toString() {
        return "OrderDriver{" +
                "return_code='" + return_code + '\'' +
                ", return_msg='" + return_msg + '\'' +
                ", return_body=" + return_body +
                '}';
    }

    /**
     * return_code : SUCCESS
     * return_msg : 获取成功
     * return_body : {"orderInfo":{"order_id":"1677","order_sn":"H124897683222034","begin_address":"天津市西青区环岛西路","begin_lng":"117.235383","begin_lat":"39.039974106432","end_address":"实验中学","end_lng":"117.198041","end_lat":"39.104204"},"studentInfo":[{"order_id":"346","order_state":"3","begin_address":"天津市西青区环岛西路","begin_lng":"117.235383","begin_lat":"39.039974106432","end_address":"实验中学","end_lng":"117.198041","end_lat":"39.104204","head_img":"http://yuntontech.oss-cn-beijing.aliyuncs.com/default/headImg/boy.png","mobile_phone":"17146119489","name":"21538d9f","departure_time":"6:46","straight_m":"7831"},{"order_id":"343","order_state":"3","begin_address":"天津市西青区环岛西路","begin_lng":"117.232599","begin_lat":"39.0521071066","end_address":"实验中学","end_lng":"117.198041","end_lat":"39.104204","head_img":"http://yuntontech.oss-cn-beijing.aliyuncs.com/default/headImg/boy.png","mobile_phone":"17181826946","name":"c93da281","departure_time":"6:49","straight_m":"6512"},{"order_id":"254","order_state":"3","begin_address":"天津市河西区江水道","begin_lng":"117.231889","begin_lat":"39.05753210667","end_address":"实验中学","end_lng":"117.198041","end_lat":"39.104204","head_img":"http://yuntontech.oss-cn-beijing.aliyuncs.com/default/headImg/boy.png","mobile_phone":"17116380559","name":"8e8edb4c","departure_time":"6:50","straight_m":"5952"},{"order_id":"338","order_state":"3","begin_address":"天津市河西区九连山路","begin_lng":"117.227424","begin_lat":"39.066283106776","end_address":"实验中学","end_lng":"117.198041","end_lat":"39.104204","head_img":"http://yuntontech.oss-cn-beijing.aliyuncs.com/default/headImg/boy.png","mobile_phone":"17118809314","name":"e0ac4b8b","departure_time":"6:54","straight_m":"4917"}]}
     */

    private String return_code;
    private String return_msg;
    private ReturnBodyBean return_body;

    public static OrderDriver objectFromData(String str) {

        return new Gson().fromJson(str, OrderDriver.class);
    }

    public static OrderDriver objectFromData(String str, String key) {

        try {
            JSONObject jsonObject = new JSONObject(str);

            return new Gson().fromJson(jsonObject.getString(str), OrderDriver.class);
        } catch (JSONException e) {
            e.printStackTrace();
        }

        return null;
    }

    public String getReturn_code() {
        return return_code;
    }

    public void setReturn_code(String return_code) {
        this.return_code = return_code;
    }

    public String getReturn_msg() {
        return return_msg;
    }

    public void setReturn_msg(String return_msg) {
        this.return_msg = return_msg;
    }

    public ReturnBodyBean getReturn_body() {
        return return_body;
    }

    public void setReturn_body(ReturnBodyBean return_body) {
        this.return_body = return_body;
    }

    public static class ReturnBodyBean {
        /**
         * orderInfo : {"order_id":"1677","order_sn":"H124897683222034","begin_address":"天津市西青区环岛西路","begin_lng":"117.235383","begin_lat":"39.039974106432","end_address":"实验中学","end_lng":"117.198041","end_lat":"39.104204"}
         * studentInfo : [{"order_id":"346","order_state":"3","begin_address":"天津市西青区环岛西路","begin_lng":"117.235383","begin_lat":"39.039974106432","end_address":"实验中学","end_lng":"117.198041","end_lat":"39.104204","head_img":"http://yuntontech.oss-cn-beijing.aliyuncs.com/default/headImg/boy.png","mobile_phone":"17146119489","name":"21538d9f","departure_time":"6:46","straight_m":"7831"},{"order_id":"343","order_state":"3","begin_address":"天津市西青区环岛西路","begin_lng":"117.232599","begin_lat":"39.0521071066","end_address":"实验中学","end_lng":"117.198041","end_lat":"39.104204","head_img":"http://yuntontech.oss-cn-beijing.aliyuncs.com/default/headImg/boy.png","mobile_phone":"17181826946","name":"c93da281","departure_time":"6:49","straight_m":"6512"},{"order_id":"254","order_state":"3","begin_address":"天津市河西区江水道","begin_lng":"117.231889","begin_lat":"39.05753210667","end_address":"实验中学","end_lng":"117.198041","end_lat":"39.104204","head_img":"http://yuntontech.oss-cn-beijing.aliyuncs.com/default/headImg/boy.png","mobile_phone":"17116380559","name":"8e8edb4c","departure_time":"6:50","straight_m":"5952"},{"order_id":"338","order_state":"3","begin_address":"天津市河西区九连山路","begin_lng":"117.227424","begin_lat":"39.066283106776","end_address":"实验中学","end_lng":"117.198041","end_lat":"39.104204","head_img":"http://yuntontech.oss-cn-beijing.aliyuncs.com/default/headImg/boy.png","mobile_phone":"17118809314","name":"e0ac4b8b","departure_time":"6:54","straight_m":"4917"}]
         */

        private OrderInfoBean orderInfo;
        private List<StudentInfoBean> studentInfo;

        public static ReturnBodyBean objectFromData(String str) {

            return new Gson().fromJson(str, ReturnBodyBean.class);
        }

        public static ReturnBodyBean objectFromData(String str, String key) {

            try {
                JSONObject jsonObject = new JSONObject(str);

                return new Gson().fromJson(jsonObject.getString(str), ReturnBodyBean.class);
            } catch (JSONException e) {
                e.printStackTrace();
            }

            return null;
        }

        public OrderInfoBean getOrderInfo() {
            return orderInfo;
        }

        public void setOrderInfo(OrderInfoBean orderInfo) {
            this.orderInfo = orderInfo;
        }

        public List<StudentInfoBean> getStudentInfo() {
            return studentInfo;
        }

        public void setStudentInfo(List<StudentInfoBean> studentInfo) {
            this.studentInfo = studentInfo;
        }

        public static class OrderInfoBean {
            @Override
            public String toString() {
                return "OrderInfoBean{" +
                        "order_id='" + order_id + '\'' +
                        ", order_sn='" + order_sn + '\'' +
                        ", begin_address='" + begin_address + '\'' +
                        ", begin_lng='" + begin_lng + '\'' +
                        ", begin_lat='" + begin_lat + '\'' +
                        ", end_address='" + end_address + '\'' +
                        ", end_lng='" + end_lng + '\'' +
                        ", end_lat='" + end_lat + '\'' +
                        ", order_state='" + order_state + '\'' +
                        '}';
            }

            /**
             * order_id : 1677
             * order_sn : H124897683222034
             * begin_address : 天津市西青区环岛西路
             * begin_lng : 117.235383
             * begin_lat : 39.039974106432
             * end_address : 实验中学
             * end_lng : 117.198041
             * end_lat : 39.104204
             */

            private String order_id;
            private String order_sn;
            private String begin_address;
            private String begin_lng;
            private String begin_lat;
            private String end_address;
            private String end_lng;
            private String end_lat;
            private String order_state;


            public static OrderInfoBean objectFromData(String str) {

                return new Gson().fromJson(str, OrderInfoBean.class);
            }

            public static OrderInfoBean objectFromData(String str, String key) {

                try {
                    JSONObject jsonObject = new JSONObject(str);

                    return new Gson().fromJson(jsonObject.getString(str), OrderInfoBean.class);
                } catch (JSONException e) {
                    e.printStackTrace();
                }

                return null;
            }

            public String getOrder_id() {
                return order_id;
            }

            public void setOrder_id(String order_id) {
                this.order_id = order_id;
            }

            public String getOrder_sn() {
                return order_sn;
            }

            public void setOrder_sn(String order_sn) {
                this.order_sn = order_sn;
            }

            public String getBegin_address() {
                return begin_address;
            }

            public void setBegin_address(String begin_address) {
                this.begin_address = begin_address;
            }

            public String getBegin_lng() {
                return begin_lng;
            }

            public void setBegin_lng(String begin_lng) {
                this.begin_lng = begin_lng;
            }

            public String getBegin_lat() {
                return begin_lat;
            }

            public void setBegin_lat(String begin_lat) {
                this.begin_lat = begin_lat;
            }

            public String getEnd_address() {
                return end_address;
            }

            public void setEnd_address(String end_address) {
                this.end_address = end_address;
            }

            public String getEnd_lng() {
                return end_lng;
            }

            public void setEnd_lng(String end_lng) {
                this.end_lng = end_lng;
            }

            public String getEnd_lat() {
                return end_lat;
            }

            public void setEnd_lat(String end_lat) {
                this.order_state = order_state;
            }

            public String getOrder_state() {
                return order_state;
            }

            public void setOrder_state(String order_state) {
                this.order_state = order_state;
            }

        }

        public static class StudentInfoBean {

            @Override
            public String toString() {
                return "StudentInfoBean{" +
                        "order_id='" + order_id + '\'' +
                        ", order_state='" + order_state + '\'' +
                        ", begin_address='" + begin_address + '\'' +
                        ", begin_lng='" + begin_lng + '\'' +
                        ", begin_lat='" + begin_lat + '\'' +
                        ", end_address='" + end_address + '\'' +
                        ", end_lng='" + end_lng + '\'' +
                        ", end_lat='" + end_lat + '\'' +
                        ", head_img='" + head_img + '\'' +
                        ", mobile_phone='" + mobile_phone + '\'' +
                        ", name='" + name + '\'' +
                        ", departure_time='" + departure_time + '\'' +
                        ", straight_m='" + straight_m + '\'' +
                        '}';
            }

            /**
             * order_id : 346
             * order_state : 3
             * begin_address : 天津市西青区环岛西路
             * begin_lng : 117.235383
             * begin_lat : 39.039974106432
             * end_address : 实验中学
             * end_lng : 117.198041
             * end_lat : 39.104204
             * head_img : http://yuntontech.oss-cn-beijing.aliyuncs.com/default/headImg/boy.png
             * mobile_phone : 17146119489
             * name : 21538d9f
             * departure_time : 6:46
             * straight_m : 7831
             */

            private String order_id;
            private String order_state;
            private String begin_address;
            private String begin_lng;
            private String begin_lat;
            private String end_address;
            private String end_lng;
            private String end_lat;
            private String head_img;
            private String mobile_phone;
            private String name;
            private String departure_time;
            private String straight_m;

            public static StudentInfoBean objectFromData(String str) {

                return new Gson().fromJson(str, StudentInfoBean.class);
            }

            public static StudentInfoBean objectFromData(String str, String key) {

                try {
                    JSONObject jsonObject = new JSONObject(str);

                    return new Gson().fromJson(jsonObject.getString(str), StudentInfoBean.class);
                } catch (JSONException e) {
                    e.printStackTrace();
                }

                return null;
            }

            public String getOrder_id() {
                return order_id;
            }

            public void setOrder_id(String order_id) {
                this.order_id = order_id;
            }

            public String getOrder_state() {
                return order_state;
            }

            public void setOrder_state(String order_state) {
                this.order_state = order_state;
            }

            public String getBegin_address() {
                return begin_address;
            }

            public void setBegin_address(String begin_address) {
                this.begin_address = begin_address;
            }

            public String getBegin_lng() {
                return begin_lng;
            }

            public void setBegin_lng(String begin_lng) {
                this.begin_lng = begin_lng;
            }

            public String getBegin_lat() {
                return begin_lat;
            }

            public void setBegin_lat(String begin_lat) {
                this.begin_lat = begin_lat;
            }

            public String getEnd_address() {
                return end_address;
            }

            public void setEnd_address(String end_address) {
                this.end_address = end_address;
            }

            public String getEnd_lng() {
                return end_lng;
            }

            public void setEnd_lng(String end_lng) {
                this.end_lng = end_lng;
            }

            public String getEnd_lat() {
                return end_lat;
            }

            public void setEnd_lat(String end_lat) {
                this.end_lat = end_lat;
            }

            public String getHead_img() {
                return head_img;
            }

            public void setHead_img(String head_img) {
                this.head_img = head_img;
            }

            public String getMobile_phone() {
                return mobile_phone;
            }

            public void setMobile_phone(String mobile_phone) {
                this.mobile_phone = mobile_phone;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public String getDeparture_time() {
                return departure_time;
            }

            public void setDeparture_time(String departure_time) {
                this.departure_time = departure_time;
            }

            public String getStraight_m() {
                return straight_m;
            }

            public void setStraight_m(String straight_m) {
                this.straight_m = straight_m;
            }
        }
    }
}
